home *** CD-ROM | disk | FTP | other *** search
- // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- //
- // VBXDEMO.CPP
- // VBX Studio 2.0
- // 18-jul-95
- // «HEXANET, COPYRIGHT HEXANET 1993-1995, ALL RIGHTS RESERVED
- // EMail: hnet@dialup.francenet.fr / CIS: 100333,27
- // HexaNet SW - BP 385.16 - 75768 PARIS CDX 16 - FRANCE
- //
- // You can distribute this file as long as you distribute
- // the full VBX Studio package.
- // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- // You can use this sample file as you want.
- // --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
- #include "stdafx.h"
- #include "vbxdemo.h"
- #include "vbpages.h"
-
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
-
- BOOL bHlpNotHere;
-
- /////////////////////////////////////////////////////////////////////////////
- // CVbxdemoApp
-
- BEGIN_MESSAGE_MAP(CVbxdemoApp, CWinApp)
- //{{AFX_MSG_MAP(CVbxdemoApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- // Standard file based document commands
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CVbxdemoApp construction
-
- CVbxdemoApp::CVbxdemoApp()
- {
- // TODO: add construction code here,
- // Place all significant initialization in InitInstance
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CVbxdemoApp object
-
- CVbxdemoApp NEAR theApp;
-
- /////////////////////////////////////////////////////////////////////////////
- // CVbxdemoApp initialization
-
- BOOL CVbxdemoApp::InitInstance()
- {
- // Standard initialization
- // If you are not using these features and wish to reduce the size
- // of your final executable, you should remove from the following
- // the specific initialization routines you do not need.
-
- CStr szAppDir, szTestVBX,sMessage;
-
- //SetDialogBkColor(); // Set dialog background color to gray
- AfxCtl3dLoad();
- LoadStdProfileSettings(); // Load standard INI file options (including MRU)
- EnableVBX(); // Initialize VBX support
-
-
- // All VBXs must be here!
- szAppDir.GetAppDir();
- szTestVBX = szAppDir;
- szTestVBX += "VBTEXT.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBBITMAP.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBLIST.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBLIST2.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBFLIST.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBFLIST2.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBCOMBO.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBFCOMBO.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBFLXTXT.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBMASK.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBEDIT.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBGAUGE.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBSPIN.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBTAB.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBLINE.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBPICBTN.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBANIM.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBFINFO.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBINI.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBDDROP.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VB3D.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBNOTE.VBX";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Error!\nCan' t load %s.\nYou may have to re-install VBX Studio 2.0 to use this sample.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- return TRUE;
- }
- szTestVBX = szAppDir;
- szTestVBX += "VBXSTD20.HLP";
- if ( !szTestVBX.DoesFileExist() )
- {
- sMessage = "Warning.\nVBXSTD20.HLP is missing: You can' t use the <More> button\nto run this help file.";
- sMessage.Replace( "%s", szTestVBX );
- sMessage.MB();
- bHlpNotHere = TRUE;
- }
-
- CPropertySheet pMainDialog("VBX Studio 2.0 - Demonstration program");
- CDlgVBOverview pPage1;
- CDlgVBList pPage2;
- CDlgVBTabList pPage3;
- CDlgVBFList pPage4;
- CDlgVBTabFList pPage5;
- CDlgVBCombo pPage6;
- CDlgVBFCombo pPage7;
- CDlgVBEdit pPage8;
- CDlgVBMask pPage9;
- CDlgVBText pPage10;
- CDlgVBFlxTxt pPage11;
- CDlgVBSpin pPage12;
- CDlgVBGauge pPage13;
- CDlgVBTab pPage14;
- CDlgVBLine pPage15;
- CDlgVBPicBtn pPage16;
- CDlgVBBitmap pPage17;
- CDlgVBAnim pPage18;
- CDlgVBDDrop pPage19;
- CDlgVB3D pPage20;
- CDlgVBNote pPage21;
- CDlgVBFInfo pPage22;
- CDlgVBIni pPage23;
- pMainDialog.AddPage( (CPropertyPage*)&pPage1 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage2 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage3 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage4 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage5 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage6 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage7 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage8 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage9 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage10 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage11 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage12 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage13 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage14 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage15 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage16 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage17 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage18 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage19 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage20 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage21 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage22 );
- pMainDialog.AddPage( (CPropertyPage*)&pPage23 );
- pMainDialog.DoModal();
- return TRUE;
- }
-
-
- int CVbxdemoApp::ExitInstance()
- {
- AfxCtl3dUnload();
- return CWinApp::ExitInstance();
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // VB-Event registration
- // (calls to AfxRegisterVBEvent will be placed here by ClassWizard)
-
- //{{AFX_VBX_REGISTER_MAP()
- UINT NEAR VBN_FILEDROPPED = AfxRegisterVBEvent("FILEDROPPED");
- UINT NEAR VBN_UPDATE = AfxRegisterVBEvent("UPDATE");
- UINT NEAR VBN_SCROLLUP = AfxRegisterVBEvent("SCROLLUP");
- UINT NEAR VBN_SCROLLDN = AfxRegisterVBEvent("SCROLLDN");
- UINT NEAR VBN_SELCHANGE = AfxRegisterVBEvent("SELCHANGE");
- UINT NEAR VBN_DBLCLICK = AfxRegisterVBEvent("DBLCLICK");
- UINT NEAR VBN_CLICK = AfxRegisterVBEvent("CLICK");
- //}}AFX_VBX_REGISTER_MAP
-
- /////////////////////////////////////////////////////////////////////////////
- // CVbxdemoApp commands
-